package com.xuecheng.content.convert;

import com.xuecheng.api.teaching.model.dto.TeachplanWorkDTO;
import com.xuecheng.content.entity.TeachplanWork;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author lz
 * @version 1.0
 * @date 2021/12/25 23:16
 */
@Mapper
public interface TeachplanWorkConvert {
    TeachplanWorkConvert INSTANCE = Mappers.getMapper(TeachplanWorkConvert.class);

    @Mappings({
            @Mapping(source = "teachplanWorkId",target = "workId"),
    })
    TeachplanWorkDTO entity2dto(TeachplanWork teachplanWork);

    List<TeachplanWorkDTO> entitys2dtos(List<TeachplanWork> teachplanWork);
}
